# -*- coding: utf-8 -*-
import redis
import ConnRedis
import yaml

# redis_conn = redis.Redis(host="116.62.107.223", port=6380, db=10, password="fuck")
# # result = redis_conn.keys()
# result = redis_conn.keys('*491721195205097286*')
#
# # keys = redis_conn.get("135009199907183530-测试1707213404")
# delresult = redis_conn.delete(*result)
# print delresult
# print result
# host = '116.62.107.223'
# port = '6380'
# name = '10'
# pwd = 'fuck'
fr = open('Config.yml', 'r')
fconfig = yaml.load(fr)
realConfig = fconfig["online"]
rediss = realConfig["redis"]
host = rediss["host"]
port = rediss["port"]
name = rediss["rname"]
pwd = rediss["password"]

print host,port,name,pwd
myredis = ConnRedis.ConnRedis(host,port,name,pwd)
# redisConn = myredis.connRedis(host, port, name, pwd)
# redisConn = myredis.connRedis('116.62.107.223', '6380', '10', 'fuck')
# redisConn = ConnRedis.ConnRedis('116.62.107.223', '6380', '10', 'fuck')
# redisConn = ConnRedis.ConnRedis(host, port, name, pwd)
result = myredis.getKeys("*642109198410093730*")
# redisConn.delkey(result)
print result
